<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page import="com.qdu.entity.Movie"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>电影信息</title>
        <link rel="stylesheet" href="css/bootstrap.min.css"/>
        <link rel="stylesheet" href="css/style.css"/>
        <link rel="stylesheet" href="css/style_mxz.css"/>
        <link rel="shortcut icon" href="https://img3.doubanio.com/favicon.ico" type="image/x-icon">
        <link rel="shortcut icon" href="https://img3.doubanio.com/favicon.ico" type="image/x-icon">
        <script src="js/jquery-3.4.1.min.js"></script>
        <script src="js/bootstrap.min.js"></script>
        <script src="js/script.js" charset="UTF-8"></script>
    </head>
    <body>
<!--        <nav class="navbar navbar-inverse">
            <div class="container-fluid btn-group-lg">
                 Brand and toggle get grouped for better mobile display 
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                        <span class="sr-only">Toggle navigation</span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                    <a class="navbar-brand" href="#">Brand</a>
                </div>

                 Collect the nav links, forms, and other content for toggling 
                <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                    <ul class="nav navbar-nav">
                        <li class="active"><a href="#">Link <span class="sr-only">(current)</span></a></li>
                        <li><a href="#">Link</a></li>
                        <li class="dropdown">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Dropdown <span class="caret"></span></a>
                            <ul class="dropdown-menu">
                                <li><a href="#">Action</a></li>
                                <li><a href="#">Another action</a></li>
                                <li><a href="#">Something else here</a></li>
                                <li role="separator" class="divider"></li>
                                <li><a href="#">Separated link</a></li>
                                <li role="separator" class="divider"></li>
                                <li><a href="#">One more separated link</a></li>
                            </ul>
                        </li>
                    </ul>
                    <form class="navbar-form navbar-left">
                        <div class="form-group">
                            <input type="text" class="form-control" placeholder="Search">
                        </div>
                        <button type="submit" class="btn btn-default">Submit</button>
                    </form>
                    <ul class="nav navbar-nav navbar-right">
                        <li><a href="#">Link</a></li>
                        <li class="dropdown">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Dropdown <span class="caret"></span></a>
                            <ul class="dropdown-menu">
                                <li><a href="#">Action</a></li>
                                <li><a href="#">Another action</a></li>
                                <li><a href="#">Something else here</a></li>
                                <li role="separator" class="divider"></li>
                                <li><a href="#">Separated link</a></li>
                            </ul>
                        </li>
                    </ul>
                </div> /.navbar-collapse 
            </div> /.container-fluid 
        </nav>-->


        <div class="container">

            <br>
            <a href="index" class="home btn-warning">AMOVIE</a>

            <hr>

            <div class="jumbotron">
                <h2 class=" padding10">电影介绍： ${movie.mchineseName}${movie.moriginalName}</h2>
                <p>详细信息</p>
                <p><a class="btn btn-primary btn-lg" href="http://localhost:8084/J01_T05_P01/gams?" role="button">返回</a></p>
            </div>
            <hr>


            <div class="content">
                <div class="leftDiv">
                    <img class="img-thumbnail" src="images/${movie.mcover}" alt="${movie.mchineseName}">
                </div>

                <div class="col-sm-8 col-md-9">

                    <!--添加电影到我的收藏-->
                    <div class="movie__btns movie__btns--full">
                        <form class="form-inline" id="add_form2">
                            <input name="mbid" type="text" style="display:none"  class="form-control" value="${movie.movieId}">
                        </form>
                        <button type='button' class="btn comment-form__btn watchlist" id="favorites_add">Add to mybook</button>
                    </div>
                </div>


                <div class="rightDiv">
                    <!--这里显示导演的超链接-->
                    <br>导演： <a target="_blank" href="gwis?workerId=${movie.mdirector }">${movie.mdirector}</a>


                    <!--这里显示电影的其他信息-->
                    <br>类型： ${movie.mtype}
                    <br>制片国家/地区： ${movie.mcountry}
                    <br>语言： ${movie.mlanguage}
                    <br>上映日期： ${movie.mreleaseDate}
                    <br>片长： ${movie.mlength} 分钟
                    <br>豆瓣评分： ${movie.mrating}
                    <br><br>
                </div>



                <div class="panel panel-primary">
                    <div class="panel-body">
                        <h3 class="">${movie.mchineseName}电影简介 · · · · · ·</h3>
                    </div>
                    <div class="panel-footer">
                        <p>
                            <!--电影剧情介绍-->
                        <h4>   ${movie.mdigest}</h4>
                        <a href="#">查看更多</a>
                        <br>
                        </p>
                    </div>
                </div>
            </div>
            <div class="container">
                <h2 class="page-heading">comments</h2>
                <div class="comment-wrapper">
                    <form id="comment-form" class="comment-form">
                        <label class="comment-form__info">leave your comments</label>
                        <br><br>
                        <textarea class="comment-form__text" placeholder='Add you comment here' name="contents"></textarea>
                        <br><br>
                        <label for="selectRating">对此部电影的评分</label>
                        <select name="rating" id="selectRating" class="form-control">
                            <option value="1">⭐</option>
                            <option value="2">⭐⭐</option>
                            <option value="3">⭐⭐⭐</option>
                            <option value="4">⭐⭐⭐⭐</option>
                            <option value="5">⭐⭐⭐⭐⭐</option>
                        </select>
                        &nbsp; <br>
                        <button type='button' class="btn btn-danger comment-form__btn" id="comment_add">add comment</button>
                    </form>

                    <br>
                    <div class="container">
                        <div class="comment-sets">

                            <!--*********************************************************************** class="comment comment--answer":回复-->

                            <c:forEach items="${commentList}" var="cl">

                                <div class="comment">
                                    <div class="comment__images">
                                        <img alt='Ta的个人头像' src="../images/${cl[2]}">
                                    </div>
                                    <a href='#' class="comment__author"><span class="social-used fa fa-vk"></span>${cl[1]}</a>
                                    <p class="comment__date">${cl[7]}<span class="comment__author" style="color: orange" >评分：${cl[8]}</span></p>
                                    <p class="comment__message">${cl[5]}</p>
                                    <a class="comment__reply" id="btn_showAddModal1" type="button">Reply</a>
                                    <jsp:include page="/vmbrls_mxz?cid=${cl[3]}"></jsp:include>
                                    </div>

                            </c:forEach>




                            <!--                        <div class="comment comment--answer">
                                                            <div class="comment__images">
                                                                <img alt='Ta的个人头像' src="../images/50x50.png" tppabs="http://placehold.it/50x50">
                                                            </div>
                                                            <a href='#' class="comment__author"><span class="social-used fa fa-vk"></span>Ice</a>
                                                            <p class="comment__date">2020/5/21 5:21<span class="comment__author" style="color: orange" >评分：5</span></p>
                                                            <p class="comment__message">看了一眼进度条，我从2分钟开始哭，真的从头哭到尾，泪点密集到仿佛枪林弹雨。藏了整整65年啊，对满世界快乐奔跑的异性情侣来说，爱是天主赐福是伟大唱诵。但对她们来说，爱却是每封情书必须把右下角的署名撕掉，以防其中一个人出了意外，也不会被人发现她们的爱。去tm的世界。</p>
                                                            <a href='#' class="comment__reply">Reply</a>
                                                            <a class="comment__reply" id="btn_showAddModal1" type="button">Reply</a>  
                                                            <a id="btn_showReply" type="button">查看回复</a>
                                                        </div>-->


                            <!--                         <div class="modal fade" id="reply_modal1" tabindex="-1">
                                                            <div class="modal-dialog">
                                                                <div class="modal-content">
                                                                    <div class="modal-header">
                                                                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                                                        <h4 class="modal-title text-success" id="myModalLabel">此条消息的回复</h4>
                                                                    </div>
                                                                    <div class="modal-body">
                                                                        
                                                                    </div>
                                                                    
                                                                </div>
                                                            </div>
                                                        </div>-->






                            <div class="modal fade" id="add_modal1" tabindex="-1">
                                <div class="modal-dialog">
                                    <div class="modal-content">
                                        <div class="modal-header">
                                            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                            <h4 class="modal-title text-success" id="myModalLabel">您的回复</h4>
                                        </div>
                                        <div class="modal-body">
                                            <form class="form-inline" id="add_form1">
                                                <label for="ireply">回复内容：</label>
                                                <textarea id="ireply" type="text" name="contents" placeholder="输入您的TA的回复：" class="form-control sinfo"></textarea>
                                                <br>

                                                <!--被回复用户标号-->
                                                <input name="usrid" type="text" style="display:none"  class="form-control" value="${cl[0]}">


                                                <!--回复哪个评论-->
                                                <input name="cid" type="text" style="display:none" class="form-control" value="${cl[3]}">


                                            </form>
                                        </div>
                                        <div class="modal-footer">
                                            <button type="button" class="btn btn-warning" data-dismiss="modal">取消</button>
                                            <button type="button" id="btn_add1" class="btn btn-primary">保存</button>
                                        </div>
                                    </div>
                                </div>
                            </div>


                            <!--**************************************************************************************************-->
                        </div>
                    </div>                      
                </div>
                <div class="comment-more">
                    <a href="Mycomment.jsp" class="watchlist">View my comments</a>
                </div>
            </div>


        </div>

    </body>
</html>
